#include "world.h"

#include "applications/data_mocker.h"
#include "applications/occlusion_collision_warning.h"
#include "applications/omnidirectional_collision_warning.h"
int main(int argc, char** argv)
{
    auto logger = rclcpp::get_logger("decision");
    RCLCPP_INFO(logger, "decision start!");

    // Force flush of the stdout buffer.
    setvbuf(stdout, NULL, _IONBF, BUFSIZ);

    // Initialize any global resources needed by the middleware and the client library.
    // This will also parse command line arguments one day (as of Beta 1 they are not used).
    // You must call this before using any other part of the ROS system.
    // This should be called once per process.
    rclcpp::init(argc, argv);

    auto world = std::make_shared<decision::adas::World>();

    world->addApplication<decision::adas::OmnidirectionalCollisionWarning>();
    //  world->addApplication<decision::adas::DataMocker>();
    //world->addApplication<decision::adas::OcclusionCollisionWarning>();
    world->build();
    world->start();

    rclcpp::spin(world);

    rclcpp::shutdown();

    return 0;
}
